<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body, html,#allmap {width: 100%;height: 100%;overflow: hidden;hidden;margin:0;}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=A520d6e719ae20b0b51c28245bd04f9a"></script>
<title>添加普通标注点</title>
</head>
<body>
<div id="allmap"></div>
</body>
</html>
<script type="text/javascript">

// 百度地图API功能
var map = new BMap.Map("allmap");
map.centerAndZoom(new BMap.Point(121.45245, 31.210991), 14);
map.enableScrollWheelZoom();

var marker = new BMap.Marker(new BMap.Point(121.45245, 31.210991));  // 创建标注
map.addOverlay(marker);              // 将标注添加到地图中

//创建信息窗口
var infoWindow = new BMap.InfoWindow("普通标注");
marker.addEventListener("click", function()
  {
    this.openInfoWindow(infoWindow);
  });

</script>
